home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / share / aclocal-1.6 / winsz.m4 < prev   
Encoding:
M4 Source File  |  2005-10-16  |  1.7 KB  |  56 lines

  1. # AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
  2.  
  3. # Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  18. # 02111-1307, USA.
  19.  
  20. # From Jim Meyering.
  21.  
  22. # serial 1
  23.  
  24. AC_DEFUN([AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
  25. [AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
  26.  AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
  27.             am_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
  28.   [am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
  29.  
  30.   gwinsz_in_termios_h=no
  31.   if test $am_cv_sys_posix_termios = yes; then
  32.     AC_EGREP_CPP([yes],
  33.     [#include <sys/types.h>
  34. #     include <termios.h>
  35. #     ifdef TIOCGWINSZ
  36.         yes
  37. #     endif
  38.     ], gwinsz_in_termios_h=yes)
  39.   fi
  40.  
  41.   if test $gwinsz_in_termios_h = no; then
  42.     AC_EGREP_CPP([yes],
  43.     [#include <sys/types.h>
  44. #     include <sys/ioctl.h>
  45. #     ifdef TIOCGWINSZ
  46.         yes
  47. #     endif
  48.     ], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
  49.   fi
  50.   ])
  51.   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
  52.     AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1,
  53.               [Define if TIOCGWINSZ requires sys/ioctl.h])
  54.   fi
  55. ])
  56.